Operation processing apparatus

ABSTRACT

The operation processing apparatus comprises a trap selecting register which stores trap maps for selecting one operating system in which the operation processing apparatus is applied out of a plurality of operating systems, a read/write controller which selects data for selecting the operating system from the trap selecting register, and a trap type encoder which encodes a trap request from an execution unit such as an integer unit, into trap type code, according to the trap maps corresponding to the selection data.

FIELD OF THE INVENTION

[0001] The present invention in general relates to an operation processing apparatus having a trap (interrupt) map for defining the corresponding relation of trap request and trap type code. More particularly, this invention relates to an operation processing apparatus capable of selecting one suited to the operating system to be used, from a plurality of trap maps.

BACKGROUND OF THE INVENTION

[0002] Hitherto, in a computer system, an operation processing apparatus designed according to the operating system to be used has been employed. This operation processing apparatus has a trap map for converting various trap requests occurring during process into codes called trap type code. When designing the operation processing apparatus, therefore, the trap map is designed to as to be suited to the operating system to be used.

[0003] However, in the conventional operation processing apparatus, when changing one operating system to a different operating system, the trap map must be newly designed, which is accompanied by many demerits from the viewpoint of designing time and cost. Therefore, the means and methods for solving such problems effectively have been keenly demanded so far.

[0004]FIG. 19 is a block diagram showing a configuration of a conventional operation processing apparatus. In this specification, the term “trap” is interpreted in a wide sense of meaning, including I-trap (Instruction Trap) detected when issuing an instruction, E-trap (Execution Trap) detected when executing an illegal instruction, trap detected at the time of asynchronous error or watchdog time-out, exception occurring in the program due to arithmetic overflow or the like, and interrupt due to external factor of I/O (Input/Output) or the like. Hence the “trap request” means request for processing (interrupt, etc.) corresponding to such “trap”.

[0005] The integer unit 10 is an operator for executing integer operation according to an integer operation command, and it issues a trap request 11 as required. The floating point unit 20 is an operator for executing a floating point operation according to a floating point operation command, and it issues a trap request 21 as required. The memory management unit 30 converts mutually between virtual address and physical address, and controls access to a cache memory (not shown), and it also issues a trap request 31 as required. The program counter/branch unit 40 counts execution programs, and predicts a branch address of branch instruction of program, and it also issues a trap request 41 as required.

[0006] The CPU local bus I/F controller 50 controls the flow of data on a local bus (not shown), and it issues a trap request 51 as required. The trap controller 60 has a function of ranking the priority of the trap requests 11, 21, 31, 41, and 51, a function of converting a trap request 71 into trap type code 91, and a function of reading and/or writing the trap type code 91. The trap type code 91 is the data for identifying the cause of a trap. The trap controller 60 is composed of a priority controller 70, a trap type encoder 80, a read/write controller 100, and a trap type register 110.

[0007] If a plurality of requests are input at the same time, the priority controller 70 selects, out of the trap requests 11, 21, 31, 41, and 51, the one with the highest priority and issues as trap request 71 according to the predetermined priority. The priority is determined in the sequence of trap request 11>trap request 21>trap request 31>trap request 41>trap request 51. In this case, when trap request 11 and trap request 21 are given at the same time, the priority controller 70 issues the trap request 11 of higher priority as the trap request 71.

[0008] The trap type encoder 80 encodes the trap request 71 from the priority controller 70 into the trap type code 91 that can be processed in the operation processing apparatus according to the trap map 90. This trap map 90 conforms to a certain type of operating system. Therefore, if the trap map 90 is used in a different type of operating system, there is a possibility of malfunction.

[0009] The trap map 90 shown in FIG. 20 defines the corresponding relation between plural trap requests and trap type code corresponding to them one by one. In the diagram, as the trap requests 71 (see FIG. 19), trap request 710 (power#on#reset: the underbar is shown in the diagram, but “#” is used instead in the specification) to trap request 71 ₅ (data#access#MMU#error) are shown, and as the trap type code 91 (see FIG. 19), trap type code 91 ₀ (0×001) to trap type code 91 ₅ (0×031) are shown. For example, when trap request 71 ₀ is given as the trap request 71 (see FIG. 19) the trap type encoder 80 issues trap type code 91 ₀ (0×001) corresponding to the trap request 71 ₀, as the trap type code 91 (see FIG. 19) according to the trap map 90.

[0010] Referring again to FIG. 19, the read/write controller 100 writes the trap type code 91 from the trap type encoder 80 into the trap type register 110, and reads the trap type code 91 from the trap type register 110, and transfers it to a memory (not shown).

[0011] When the trap request 11 is issued only from the integer unit 10, the priority controller 70 sends the trap request 11 to the trap type encoder 80 as trap request 71. In this case, the trap request 71 is supposed to be trap request 71 ₀ shown in FIG. 20. Hence, the trap type encoder 80 refers to the trap map 90, and encodes the tarp request 71 ₀ into trap type code 91 ₀ (0×001). This trap type code 91 ₀ is, by the control of the read/write controller 100 shown in FIG. 19, written into the trap type register 110, and is read and transferred to the memory (not shown).

[0012] In this conventional operation processing apparatus, the trap map 90 shown in FIG. 20 corresponds to one certain type of operating system (or a system in short), and it has been designed exclusively for this operating system from the beginning. Therefore, when this operation processing apparatus is used in other operating system, the corresponding relation between the trap requests and trap type code is different, and hence malfunction may occur.

[0013] To avoid such problem, hitherto, it has been attempted to remake the trap map to be suited to other operating system, or exchange the trap type code at the operating system side.

[0014] Such measures, however, require must time and cost for remaking of trap map, or may be accompanied by other problems due to exchange of trap type code (lowering of performance), and hence they are not radical solutions for the problems due to difference in operating system.

[0015] Furthermore, in the conventional operation processing apparatus, the priority controller 70 shown in FIG. 19 controls the priority corresponding to plural trap requests issued from every execution unit including the integer unit 10, floating point unit 20, . . . , and CPU local bus I/F controller 50.

[0016] However, the priority cannot be controlled within the execution unit, and fine control cannot be done. That is, in the conventional operation processing apparatus, the priority cannot be controlled among plural trap requests issued at the same time in the execution unit, and the priority cannot be controlled according to the state of the execution unit.

SUMMARY OF THE INVENTION

[0017] It is an object of the present invention to provided an operation processing apparatus capable of applying easily and inexpensively in a plurality of systems (a first object), and executing a fine priority control to trap requests at the execution unit side (a second object).

[0018] In the operation processing apparatus according to one object of this invention, a selecting unit selects the first system (or second system), and an encoding unit encodes the trap request according to the first trap map (or second trap map) corresponding to the first system. Thus, the encoding unit has the first trap map and second trap map corresponding to the first system and second system respectively, and the trap map can be changed depending on the system. As a result, this operation processing apparatus can be applied easily and inexpensively in plural systems.

[0019] In the operation processing apparatus according to another object of this invention, an encoding unit has the first trap map and second trap map conforming to the first state and second state of the execution unit. Thus, the trap map can be changed depending on the state of the execution unit. As a result, a fine trap request control can be executed depending on the state of the execution unit.

[0020] In the operation processing apparatus according to still another object of this invention, a priority control unit selects on the basis of the priority corresponding to the state of the execution unit among plural trap requests in the execution unit, the priority control can be finely executed corresponding to the trap request at the execution unit side.

[0021] In the operation processing apparatus according to still another object of this invention, a priority control unit selects on the basis of the priority corresponding to the state of the first execution unit among plural trap requests in the second execution unit. As a result, priority control can be finely executed corresponding to the trap request at the second execution unit side.

[0022] In the operation processing apparatus according to still another object of this invention, a priority control unit selects on the basis of the priority corresponding to the state of the first execution unit and the state of the second execution unit among plural trap requests in the second execution unit. As a result, the priority control can be finely executed corresponding to the trap request at the second execution unit side.

[0023] Other objects and features of this invention will become apparent from the following description with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0024]FIG. 1 is a block diagram showing a configuration of a first embodiment of the invention.

[0025]FIG. 2 is a diagram showing a configuration of a trap type encoder 210 shown in FIG. 1.

[0026]FIG. 3 is a block diagram showing a configuration of a second embodiment of the invention.

[0027]FIG. 4 is a block diagram showing a configuration of a third embodiment of the invention.

[0028]FIG. 5 is a block diagram showing a configuration of a fourth embodiment of the invention.

[0029]FIG. 6 is a block diagram showing a configuration of a fifth embodiment of the invention.

[0030]FIG. 7 is a block diagram showing a configuration of a sixth embodiment of the invention.

[0031]FIG. 8 is a block diagram showing a configuration of a seventh embodiment of the invention.

[0032]FIG. 9 is a diagram showing a configuration of a floating point unit 800 shown in FIG. 8.

[0033]FIG. 10 is a block diagram showing a configuration of an eighth embodiment of the invention.

[0034]FIG. 11 is a diagram showing a configuration of a sub-priority controller 930 shown in FIG. 10.

[0035]FIG. 12 is a block diagram showing a configuration of a ninth embodiment of the invention.

[0036]FIG. 13 is a block diagram showing a configuration of a tenth embodiment of the invention.

[0037]FIG. 14 is a block diagram showing a configuration of an eleventh embodiment of the invention.

[0038]FIG. 15 is a diagram showing a configuration of a register 1210 and a sub-priority controller 1320 shown in FIG. 14.

[0039]FIG. 16 is a block diagram showing a configuration of a twelfth embodiment of the invention.

[0040]FIG. 17 is a block diagram showing a configuration of a thirteenth embodiment of the invention.

[0041]FIG. 18 is a block diagram showing a configuration of a fourteenth embodiment of the invention.

[0042]FIG. 19 is a block diagram showing a configuration of a conventional operation processing apparatus.

[0043]FIG. 20 is a diagram showing a configuration of a trap type encoder 80 shown in FIG. 19.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0044] Preferred embodiments of the operation processing apparatus of the invention are described in detail below while referring to the attached drawings.

[0045]FIG. 1 is a block diagram showing a configuration of a first embodiment of the invention. In the diagram, the components corresponding to the parts in FIG. 19 are identified with same reference numerals. Herein, instead of the trap controller 60 shown in FIG. 19, a trap controller 200 is provided. In this trap controller 200, instead of the trap type encoder 80 and read/write controller 100 shown in FIG. 19, a trap type encoder 210 and a read/write controller 260 are provided, and also a trap map selecting register 240 and a decoder 250 are newly provided.

[0046] The trap type encoder 210 encodes the trap request 71 from the priority controller 70 into trap type code 231 to be processed in the operation processing apparatus, according to one trap map preliminarily selected from two traps maps 220 ₀ and 220 ₁. Herein, the trap maps 220 ₀ and 220 ₁ conform to two operating systems (hereinafter called first operating system and second operating system).

[0047] That is, the trap map 220 ₀ shown in FIG. 2 is to define the corresponding relation with the trap type code (0×001) to (0×031) corresponding one by one to the trap request 71 ₀ (power#on#reset) to the trap request 71 ₅ (data#access#MMU#error) as the trap request 71 (see FIG. 1), and it conforms to the first operating system.

[0048] On the other hand, the trap map 220 ₁ defines the corresponding relation with the trap type code (0×021) to (0×051) corresponding one by one to the trap request 71 ₀ (power#on#reset) to the trap request 71 ₅ (data#access#MMU#error) as the trap request 71 (see FIG. 1), but different from the trap map 220 ₀, and it conforms to the second operating system. That is, in the first embodiment, depending on the type of the operating system, the conforming trap map is selected.

[0049] Referring again to FIG. 1, a multiplexer 230 selects either one of trap map 222 ₀ and trap map 220 ₁, depending on selection data SELA₂. For example, when the trap map 220 ₀ shown in FIG. 2 is selected and the trap request 71 ₀ is entered, the multiplexer 230 issues trap type code 231 ₀ (0×001) of the trap map 220 ₀ side.

[0050] On the other hand, when the trap map 220 ₁ is selected and the trap request 710 is entered, the multiplexer 230 issues trap type code 231 ₀ (0×021) of the trap map 220 ₁ side. Herein, each one of trap type code 231 ₀ to 231 ₅ is issued to the read/write controller 260 as the trap type code 231 shown in FIG. 1.

[0051] The trap map selecting register 240 writes (or reads) selection data SELA₁ by means of the read/write controller 260. This selection data SELA₁ is the data for selecting one conforming to the operating system to be used, out of trap map 220 ₀ and trap map 220 ₁. The decoder 250 decodes the selection data SELA₁ written into the trap map selecting register 240, and sends it to the multiplexer 230 as selection data SELA₂.

[0052] The read/write controller 260 writes the trap type code 231 from the trap type encoder 210 into the trap type register 110, and reads the trap type code 231 from the trap type register 110, and transfers it to a memory (not shown). The read/write controller 260 writes the preset selection data SELA₁ into the trap map selecting register 240, and reads the selection data SELA₁ from the trap map selecting register 240 as required.

[0053] The operation of the first embodiment will now be explained. When the operation processing apparatus shown in FIG. 1 is applied in the first operating system, the read/write controller 260 writes selection data SELA₁ for selecting the trap map 220 ₀ corresponding to the first operating system into the trap map selecting register 240. This selection data SELA₁ is decoded by the decoder 250, and issued to the multiplexer 230 as selection data SELA₂. As a result, the trap map 220 ₀ is selected in the multiplexer 230.

[0054] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 210 as the trap request 71. In this case, suppose the trap request 71 is the trap request 71 ₀ shown in FIG. 2. Consequently, the trap type encoder 210 refers to the trap map 220 ₀, encodes the trap request 71 ₀ into trap type code 231 ₀ (0×001), and issues it to the read/write controller 260.

[0055] This trap type code 231 ₀ (0×001) is written into the trap type register 110 by the control of the read/write controller 260 shown in FIG. 1, and is then read and transferred to the memory (not shown). In FIG. 2, meanwhile, the trap request 710 is encoded into the trap type code (0×021) according to other trap map 220 ₁. In this case, however, since the trap map 220 ₀ side is selected by the multiplexer 230, the trap type code (0×021) is not issued.

[0056] On the other hand, when the operation processing apparatus is applied in the second operating system, the read/write controller 260 writes selection data SELA₁ for selecting the trap map 220 ₁ corresponding to the second operating system into the trap map selecting register 240. This selection data SELA₁ is decoded by the decoder 250, and issued to the multiplexer 230 as selection data SELA₂. As a result, the trap map 220 ₁ is selected in the multiplexer 230.

[0057] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 210 as the trap request 71 (for example, trap request 710 (see FIG. 2)). Consequently, the trap type encoder 210 refers to other trap map 220 ₁, encodes the trap request 71 ₀ into trap type code 231 ₀ (0×021), and issues it to the read/write controller 260.

[0058] This trap type code 231 ₀ (0×021) is written into the trap type register 110 by the control of the read/write controller 260 shown in FIG. 1, and is then read and transferred to the memory (not shown). In FIG. 2, meanwhile, the trap request 71 ₀ is encoded into the trap type code (0×001) according to other trap map 220 ₀. In this case, contrary to the above case, since the trap map 220 ₁ side is selected by the multiplexer 230, the trap type code (0×001) is not issued.

[0059] As explained herein, according to the first embodiment, the trap maps 220 ₀ and 220 ₁ corresponding to plural operating systems are provided in the trap type encoder 210, and the trap map can be changed over depending on the operating system, so that the operation processing apparatus can be easily and inexpensively applied in plural operating systems.

[0060] In the first embodiment, the trap map is selected on the basis of the internal action of writing selection data SELA₁ in the trap map selecting register 240 shown in FIG. 1, but the trap map may be selected on the basis of an external action by using a selector 320 as shown in FIG. 3. Such example of configuration is explained below as a second embodiment.

[0061]FIG. 3 is a block diagram showing a configuration of the second embodiment of the invention. In the diagram, the components corresponding to the parts in FIG. 1 are identified with same reference numerals. Herein, instead of the trap controller 200 shown in FIG. 1, a trap controller 300 is provided, and also a selector 320 is newly provided. In this trap controller 300, instead of the trap map selecting register 240 and decoder 250 shown in FIG. 1, a decoder 310 is provided.

[0062] The selector 320 is provided as an external mechanism of the trap controller 300, and is designed to set selection data SELB₁. This selection data SELB₁ is the data for selecting one conforming to the operating system to be used, out of trap map 220 ₀ and trap map 220 ₁.

[0063] The selector 320 comprises a terminal 321, a terminal 322 grounded through a pull-down resistor 323, a terminal 324 connected to the power source through a pull-up resistor 325, and a jumper wire 326 connecting between terminal 321 and terminal 322 or between terminal 321 and terminal 324.

[0064] This jumper wire 326 is connected between terminal 321 and terminal 322 when setting selection data SELB₁ for selecting the trap map 220 ₀ conforming to the first operating system, or between terminal 321 and terminal 324 when setting selection data SELB₁ for selecting the trap map 220 ₁ conforming to the second operating system. In the trap controller 300, the decoder 310 decodes the selection data SELB₁ into selection data SELB₂. In the second embodiment, the multiplexer 230 selects either trap map 220 ₀ or trap map 220 ₁, by the selection data SELB₂.

[0065] The operation of the second embodiment will now be explained. When the operation processing apparatus shown in FIG. 3 is applied in the first operating system, the jumper wire 326 is connected between terminal 321 and terminal 322. Accordingly, the selector 320 sends out the selection data SELB₁ for selecting the trap map 220 ₀ to the decoder 310. This selection data SELB₁ is decoded by the decoder 310, and is issued to the multiplexer 230 as selection data SELB₂. As a result, the trap map 220 ₀ is selected in the multiplexer 230.

[0066] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 210 as the trap request 71. In this case, suppose the trap request 71 is the trap request 71 ₀ shown in FIG. 2.

[0067] Hereinafter, same as in the first embodiment, the trap type encoder 210 refers to the trap map 220 ₀, encodes the trap request 71 ₀ into trap type code 231 ₀ (0×001), and issues it to the read/write controller 260. This trap type code 231 ₀ (0×001) is written into the trap type register 110 by the control of the read/write controller 260 shown in FIG. 3, and is then read and transferred to the memory (not shown) On the other hand, when the operation processing apparatus is applied in the second operating system, the jumper wire 326 is connected between terminal 321 and terminal 324. Accordingly, the selector 320 sends out the selection data SELB₁ for selecting the trap map 220 ₁ to the decoder 310. This selection data SELB₁ is decoded by the decoder 310, and is issued to the multiplexer 230 as selection data SELB₂. As a result, the trap map 220 ₁ is selected in the multiplexer 230.

[0068] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 210 as the trap request 71 (for example, trap request 710 (see FIG. 2)). Hereinafter, same as in the first embodiment, the trap type encoder 210 refers to other trap map 220 ₁, encodes the trap request 710 into trap type code 231 ₀ (0×021), and issues it to the read/write controller 260. This trap type code 231 ₀ (0×021) is written into the trap type register 110 by the control of the read/write controller 260 shown in FIG. 3, and is then read and transferred to the memory (not shown).

[0069] In the first embodiment, either the trap map 220 ₀ or the trap map 220 ₁ is selected by the selection data SELA₁ shown in FIG. 1, but it may be also designed to select either the trap map 220 ₀ or the trap map 220 ₁ depending on the two statuses (states) of the execution unit. Such example of configuration is explained below as a third embodiment. Herein, the execution unit is any one of the integer unit 10, floating point unit 20, memory management unit 30, program counter/branch unit 40, and CPU local bus I/F controller 50 shown in FIG. 1.

[0070]FIG. 4 is a block diagram showing a configuration of the third embodiment of the invention. In the diagram, the components corresponding to the parts in FIG. 1 are identified with same reference numerals in FIG. 4, instead of the memory management unit 30 shown in FIG. 1, a memory management unit 400 (execution unit) is provided. In the trap controller 200 shown in FIG. 4, however, the trap map selecting register 240 shown in FIG. 1 is not provided.

[0071] The memory management unit 400, same as the memory management unit 30 (see FIG. 1), converts mutually between virtual address and physical address, and controls access to a cache memory (not shown), and it also issues a trap request 31 as required. The memory controller 400 comprises a register 410. In this register 410, status data STM₁ showing the status (state) of the memory management unit 400 is stored. The status is classified into a status corresponding to normal state of the memory management unit 30 (called first status) and a status corresponding to other than normal status (called second status).

[0072] The status data STM₁ is the data for selecting one corresponding to the status of the memory management unit 400, out of the trap map 220 ₀ and trap map 220 ₁. For example, when the status data STM₁ expresses the first status (normal) this status data STM₁ is the data for selecting the trap map 220 ₀. On the other hand, when the status data STM₁ expresses the second state (other than normal), this status data STM₁ is the data for selecting the trap map 220 ₁. In the third embodiment, the decoder 250 decodes the status data STM₁ into selection data SELA₂.

[0073] The operation of the third embodiment is explained. When the status of the memory management unit 400 shown in FIG. 4 is the first status (normal), the memory management unit 400 stores the status data STM₁ expressing the first status in the register 410. This status data STM₁ is decoded by the decoder 250, and is issued to the multiplexer 230 as selection data SELA₂. As a result, the trap map 220 ₀ is selected in the multiplexer 230.

[0074] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 210 as the trap request 71. In this case, suppose the trap request 71 is the trap request 71 ₀ shown in FIG. 2.

[0075] Hereinafter, same as in the first embodiment, the trap type encoder 210 refers to the trap map 220 ₀, encodes the trap request 71 ₀ into trap type code 231 ₀ (0×001), and issues it to the read/write controller 260. This trap type code 231 ₀ (0×001) is written into the trap type register 110 by the control of the read/write controller 260 shown in FIG. 4, and is then read and transferred to the memory (not shown) On the other hand, when the status of the memory management unit 400 is changed from the first status (normal) to the second status (other than normal), the memory management unit 400 stores the status data STM₁ expressing the second status in the register 410. This status data STM₁ is decoded by the decoder 250, and is issued to the multiplexer 230 as selection data SELA₂. As a result, the trap map 220 ₁ is selected in the multiplexer 230.

[0076] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 210 as the trap request 71 (for example, trap request 71 ₀ (see FIG. 2)).

[0077] Hereinafter, same as in the first embodiment, the trap type encoder 210 refers to other trap map 220 ₁, encodes the trap request 71 ₀ into trap type code 231 ₀ (0×021), and issues it to the read/write controller 260. This trap type code 231 ₀ (0×021) is written into the trap type register 110 by the control of the read/write controller 260 shown in FIG. 4, and is then read and transferred to the memory (not shown).

[0078] In the third embodiment, the execution unit is the memory management unit 400, but in other execution unit than the memory management unit 400 (integer unit 10, floating point unit 20, program counter/branch unit 40, or CPU local bus I/F controller 50), a same register as the register 410 may be provided, and the trap map may be selected depending on the status of the execution unit.

[0079] As explained herein, according to the third embodiment, the trap maps 220 ₀ and 220 ₁ conforming to the states of the memory management unit 400 (execution unit) are provided in the trap type encoder 210, and the trap map can be changed over depending on the state of the memory management unit 400 (execution unit), and therefore the trap request can be controlled finely depending on the state of the execution unit.

[0080] In the first embodiment, one is selected from two trap maps 220 ₀ and 220 ₁ shown in FIG. 1 conforming to two operating systems, but it may be also designed to select one from n types of (three or more) trap maps conforming to n types of operating systems. Such example is explained below as a fourth embodiment.

[0081]FIG. 5 is a block diagram showing a configuration of the fourth embodiment of the invention. In the diagram, the components corresponding to the parts in FIG. 1 are identified with same reference numerals. Herein, instead of the trap controller 200 shown in FIG. 1, a trap controller 500 is provided. In this trap controller 500, instead of the trap type encoder 210, trap map selecting register 240, decoder 250, and read/write controller 260 shown in FIG. 1, trap type encoder 510, read/write controller 530, trap map selecting register 540, and decoder 550 are provided.

[0082] The trap type encoder 510 encodes the trap request 71 from the priority controller 70 into trap type code 521 to be processed in the operation processing apparatus, according to one trap map of n types of trap maps 220 ₀, 220 ₁, . . . 220 _(n). These trap maps 220 ₀, 220 ₁, 220 _(n) conform to n types of operating systems respectively (hereinafter called first operating system, second operating system, . . . , n-th operating system).

[0083] The multiplexer 520 selects one of the trap maps 220 ₀, 220 ₁, . . . , 220 _(n) by selection data SELC₂. For example, when the trap map 220 ₁ is selected and the trap request 71 is entered, the multiplexer 520 issues trap type code 521 encoded according to the trap map 2201. Similarly, when the trap map 220 _(n) is selected and the trap request 71 is entered, the multiplexer 520 issues trap type code 521 encoded according to the trap map 220 _(n).

[0084] The trap map selecting register 540 writes (or reads) the selection data SELC₁ according to the read/write controller 530. This selection data SELC₁ is the data for selecting one conforming to the operating system to be used form the trap maps 220 ₀, 220 ₁, 220 _(n). The decoder 550 decodes the selection data SELC₁ written in the trap map selecting register 540, and issues it to the multiplexer 520 as selection data SELC₂.

[0085] The read/write controller 530 writes the trap type code 521 from the trap type encoder 510 into the trap type register 110, and reads the trap type code 521 from the trap type register 110, then transfers it to a memory (not shown). The read/write controller 530 also write the preset selection data SELC₁ into the trap map selecting register 540, and reads the selection data SELC₁ from the trap map selection register 540 as required.

[0086] The operation of the fourth embodiment will now be explained. When the operation processing apparatus shown in FIG. 5 is applied in the first operating system, the read/write controller 530 writes selection data SELC₁ for selecting the trap map 220 ₀ corresponding to the first operating system into the trap map selecting register 540. This selection data SELC₁ is decoded by the decoder 550, and issued to the multiplexer 520 as selection data SELC₂. As a result, the trap map 220 ₀ is selected in the multiplexer 520.

[0087] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 510 as the trap request 71. Thus, same as in the first embodiment, the trap type encoder 510 refers to the trap map 220 ₀, encodes the trap request 71 into trap type code 521, and issues it to the read/write controller 530. This trap type code 521 is written into the trap type register 110 by the control of the read/write controller 530, and is then read and transferred to the memory (not shown).

[0088] On the other hand, when the operation processing apparatus is applied in the n-th operating system, the read/write controller 530 writes selection data SELC₁ for selecting the trap map 220 _(n) corresponding to the n-th operating system into the trap map selecting register 540. This selection data SELC₁ is decoded by the decoder 550, and issued to the multiplexer 520 as selection data SELC₂. As a result, the trap map 220 _(n) is selected in the multiplexer 520.

[0089] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 510 as the trap request 71. Consequently, the trap type encoder 510 refers to the trap map 220 _(n), encodes the trap request 71 into trap type code 521, and issues it to the read/write controller 530. This trap type code 521 is written into the trap type register 110 by the control of the read/write controller 530, and is then read and transferred to the memory (not shown).

[0090] In the fourth embodiment, the trap map is selected on the basis of the internal action of writing selection data SELC₁ in the trap map selecting register 540 shown in FIG. 5, but the trap map may be selected on the basis of an external action by using a selector 620 as shown in FIG. 6 same as in the second embodiment. Such example of configuration is explained below as a fifth embodiment.

[0091]FIG. 6 is a block diagram showing a configuration of the fifth embodiment of the invention. In the diagram, the components corresponding to the parts in FIG. 5 are identified with same reference numerals. Herein, instead of the trap controller 500 shown in FIG. 5, a trap controller 600 is provided, and also a selector 620 is newly provided. In this trap controller 600, instead of the trap map selecting register 540 and decoder 550 shown in FIG. 5, a decoder 610 is provided.

[0092] The selector 620 is provided as an external mechanism of the trap controller 600, and is designed to set selection data SELD₁. This selection data SELD₁ is composed of m bits, and is the data for selecting one conforming to the operating system to be used, out of trap maps 220 ₀, 220 ₁, . ., 220 _(n).

[0093] The selector 620 comprises m terminals 621 ₁ to 621 _(m), a terminal 622 grounded through a pull-down resistor 623, a terminal 624 connected to the power source through a pull-up resistor 625, and m jumper wires 326 ₁ to 316 _(m) connecting between terminal 621 ₁ and terminal 622 (or terminal 624), . . . , and between terminal 621 _(m) and terminal 622 (or terminal 624).

[0094] In the fifth embodiment, depending on the combination of connection of these jumper wires 326 ₁ to 326 _(m) (connected to the pull-down resistor 623 side or connected to the pull-up resistor 625 side), the m-bit selection data SELD₁ is expressed by “0” or “1”. For example, when all of the jumper wires 626 ₁ to 626 _(m) are connected to the terminal 622 (grounding side), the selection data SELD₁ is expressed as “0000. 000” (all 0), and it is the data for selecting the trap map 220 ₀.

[0095] The operation of the fifth embodiment is explained. When the operation processing apparatus shown in FIG. 6 is applied in the first operating system, all of jumper wires 626 ₁ to 626 _(m) are connected between terminals 621 ₁ to 621 _(m) and terminal 622. Accordingly, the selector 620 sends out the selection data SELD₁ for selecting the trap map 220 ₀ to the decoder 610. This selection data SELD₁ is decoded by the decoder 610, and is issued to the multiplexer 520 as selection data SELD₂. As a result, the trap map 220 ₀ is selected in the multiplexer 520.

[0096] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 510 as the trap request 71. Consequently, the trap type encoder 510 refers to the trap map 220 ₀, encodes the trap request 71 into trap type code 521, and issues it to the read/write controller 530. This trap type code 521 is written into the trap type register 110 by the control of the read/write controller 530, and is then read and transferred to the memory (not shown).

[0097] On the other hand, when the operation processing apparatus is applied in the n-th operating system, each one of the jumper wires 626 ₁ to 626 _(m) is connected between terminals 621 ₁ to 621 _(m) and terminal 622 (terminal 624) in the combination corresponding to the trap map 220 _(n). Accordingly, the selector 620 sends out the selection data SELD₁ for selecting the trap map 220 _(n) to the decoder 610. This selection data SELD₁ is decoded by the decoder 610, and is issued to the multiplexer 520 as selection data SELD₂. As a result, the trap map 220 _(n) is selected in the multiplexer 520.

[0098] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 510 as the trap request 71. Hereinafter, the trap type encoder 510 refers to the trap map 220 _(n), encodes the trap request 71 into trap type code 521, and issues it to the read/write controller 530. This trap type code 521 is written into the trap type register 110 by the control of the read/write controller 530 shown in FIG. 6, and is then read and transferred to the memory (not shown) In the fourth embodiment, one of the trap maps 220 ₀, 220 ₁, . . . , 220 _(n) is selected by the selection data SELC₁ shown in FIG. 5, but it may be also designed to select one of the trap maps 220 ₀, 220 ₁, . . . , 220 _(n) depending on n types of status (state) of the execution unit. Such example of configuration is explained below as a sixth embodiment.

[0099]FIG. 7 is a block diagram showing a configuration of the sixth embodiment of the invention. In the diagram, the components corresponding to the parts in FIG. 5 and FIG. 4 are identified with same reference numerals. In FIG. 7, instead of the memory management unit 30 shown in FIG. 5, a memory management unit 400 (execution unit: see FIG. 4) is provided. In the trap controller 700 shown in FIG. 7, moreover, instead of the trap map selecting register 540 and decoder 550 shown in FIG. 5, a decoder 710 is provided.

[0100] The memory management unit 400, same as the memory management unit 30 (see FIG. 5), converts mutually between virtual address and physical address, and controls access to a cache memory (not shown), and it also issues a trap request 31 as required. The memory controller 400 comprises a register 410. In this register 410, status data STM₁ showing n types of status (state) of the memory management unit 400 is stored. The status includes n types of first status, second status, . . . , n-th status.

[0101] The status data STM₁ is the data for selecting one corresponding to the status of the memory management unit 400, out of the trap maps 220 ₀, 220 ₁, . . . , 220 _(n). For example, when the status data STM₁ expresses the first status, this status data STM₁ is the data for selecting the trap map 220 ₀. Similarly, when the status data STM₁ expresses then-th state, this status data STM₁ is the data for selecting the trap map 220 _(n). The decoder 710 decodes the status data STM₁ into selection data SELC₂.

[0102] The operation of the sixth embodiment will now be explained. When the status of the memory management unit 400 shown in FIG. 7 is the first status, the memory management unit 400 stores the status data STM₁ expressing the first status in the register 410. This status data STM₁ is decoded by the decoder 710, and is issued to the multiplexer 520 as selection data SELC₂. As a result, the trap map 220 ₀ is selected in the multiplexer 520.

[0103] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 510 as the trap request 71. Then, the trap type encoder 510 refers to the trap map 220 ₀, encodes the trap request 71 into trap type code 521, and issues it to the read/write controller 530. This trap type code 521 is written into the trap type register 110 by the control of the read/write controller 530, and is then read and transferred to the memory (not shown).

[0104] When the status of the memory management unit 400 is changed from the first status to the n-th status, the memory management unit 400 stores the status data STM₁ expressing the n-th status in the register 410. This status data STM₁ is decoded by the decoder 71 ₀, and is issued to the multiplexer 520 as selection data SELC₂. As a result, the trap map 220 _(n) is selected in the multiplexer 520.

[0105] In this state, when the trap request 11 is issued only from the integer unit 10, the priority controller 70 issues the trap request 11 to the trap type encoder 510 as the trap request 71. Then, the trap type encoder 510 refers to the trap map 220 _(n), encodes the trap request 71 into trap type code 521, and issues it to the read/write controller 530. This trap type code 521 is written into the trap type register 110 by the control of the read/write controller 530, and is then read and transferred to the memory (not shown).

[0106] In the sixth embodiment, the execution unit is the memory management unit 400, but in other execution unit than the memory management unit 400 (integer unit 10, floating point unit 20, program counter/branch unit 40, or CPU local bus I/F controller 50), a same register as the register 410 may be provided, and the trap map may be selected depending on the status of the execution unit.

[0107] In the first to sixth embodiments, the priority is controlled by the priority controller 70 (see FIG. 1), on plural trap requests issued from each execution unit including the integer unit 10, floating point unit 20, . . . , CPU local bus I/F controller 50, but it may be also designed to control the priority within the execution unit. Such example is explained as a seventh embodiment below.

[0108]FIG. 8 is a block diagram showing a configuration of the seventh embodiment of the invention. In the diagram, same components as in parts in FIG. 19 are identified with same reference numerals. Herein, instead of the floating point unit 20 shown in FIG. 19, a floating point unit 800 as execution unit is provided. This floating point unit 800, same as the floating point unit 20 (see FIG. 19), is an operator for executing floating point operation according to a floating point operation command, and issues trap request 21 as required.

[0109] The floating point unit 800 comprises a register 810, a decoder 820, and sub-priority controller 830. In the register 810 shown in FIG. 9, status data STF₁ expressing the status (state) of the floating point unit 800 is stored. An example of this status is whether the floating point unit 800 is in a state for operating in compliance with IEEE (Institute of Electrical and Electronics Engineers) 754 or not.

[0110] When the floating point unit 800 is in a state for operating in compliance with IEEE754, ieee#mode=1 is stored in the register 810 as status data STF₁. On the other hand, when the floating point unit 800 is in a state for operating other than IEEE754, ieee#mode=0 is stored in the register 810 as status data STF₁. The decoder 820 decodes the status data STF₁, and issues it as selection data SP₁.

[0111] This selection data SP₁ is the data for selecting either one of trap request 840 ₀ (fp#exception#ieee#754) and trap request 840 ₁ (fp#exception#other) by the multiplexer 832. Specifically, when the status data STF₁ is ieee#mode=1, the multiplexer 832 selects the trap request 840 ₀ which is the output of the priority encoder 831 ₀, and sends it to the priority controller 70 as the trap request 21 (see FIG. 8).

[0112] On the other hand, when the status data STF₁ is ieee#mode=0, the multiplexer 832 selects the trap request 840 ₁ which is the output of the priority encoder 831 ₁, and sends it to the priority controller 70 as the trap request 21 (see FIG. 8). Herein, the trap request 840 ₀ conforms to IEEE754, and the trap request 840 ₁ does not conform to IEEE754.

[0113] The priority encoder 831 ₀, when the trap request 840 ₀ and trap request 840 ₁ are entered at the same time, encodes the trap request 840 ₀ by priority. On the other than, the priority encoder 831 ₁, when the trap request 840 ₀ and trap request 840 ₁ are entered at the same time, encodes the trap request 840 ₁ by priority.

[0114] The operation of the seventh embodiment will now be explained. In FIG. 9, in the case of operation in compliance with IEEE754, the floating point unit 800 stores ieee#mode=1 in the register 810 as status data STF₁. This status data STF₁ is decoded by the decoder 820, and is issued to the multiplexer 832 as selection data SP₁. As a result, the priority encoder 831 ₀ side is selected in the multiplexer 832.

[0115] In this state, when the trap request 840 ₀ and trap request 840 ₁ are given at the same time, the priority encoder 831 ₀ encodes the trap request 840 ₀ by priority. On the other hand, the priority encoder 831 ₁ encodes the trap request 840 ₁ by priority.

[0116] In this case, since the priority encoder 831 ₀ side is selected by the multiplexer 832, the trap request 840 ₀ is issued from the multiplexer 832 to the priority controller 70 shown in FIG. 8 as the trap request 21. Thereafter, by the same operation as mentioned above, the trap request 21 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0117] In FIG. 9, in the case of operation other than IEEE754, the floating point unit 800 stores ieee#mode=0 in the register 810 as status data STF₁. This status data STF₁ is decoded by the decoder 820, and is issued to the multiplexer 832 as selection data SP₁. Asa result, the priority encoder 831 ₁ side is selected in the multiplexer 832.

[0118] In this state, when the trap request 8400 and trap request 840 ₁ are given at the same time, the priority encoder 831 ₀ encodes the trap request 840 ₀ by priority, while the priority encoder 831 ₁ encodes the trap request 840 ₁ by priority.

[0119] In this case, since the priority encoder 831 ₁ side is selected by the multiplexer 832, the trap request 840 ₁ is issued from the multiplexer 832 to the priority controller 70 shown in FIG. 8 as the trap request 21. Thereafter, by the same operation as mentioned above, the trap request 21 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0120] In the seventh embodiment, the execution unit is the floating point unit 800, but, alternatively, other execution unit than the floating point unit 800 (integer unit 10, memory management unit 30, program counter/branch unit 40, or CPU local bus I/F controller 50) may be provided with the same function as the floating point unit 800, and the trap request may be controlled by priority depending on the status of the execution unit.

[0121] As explained herein, according to the seventh embodiment, since either one of the plural tarp requests 840 ₀ and 840 ₁ in the floating point unit 800 (execution unit) is selected on the basis of the priority corresponding to the state of the sub-priority controller 830 (execution unit) by means of the sub-priority controller 830, the priority control on the trap request can be executed finely at the execution unit side.

[0122] In the seventh embodiment, the priority is controlled by the floating point unit 800 (execution unit) shown in FIG. 8, on two trap requests 840 ₀ and 840 ₁, but it may be also designed to control priority on n types (three or more) of trap requests. Such example is explained as an eighth embodiment below.

[0123]FIG. 10 is a block diagram showing a configuration of the eighth embodiment of the invention. In the diagram, same components as in parts in FIG. 19 are identified with same reference numerals. Herein, instead of the memory management unit 30 shown in FIG. 19, a memory management unit 900 as execution unit is provided. This memory management unit 900, same as the memory management unit 30 (see FIG. 19), converts mutually between virtual address and physical address, controls accesses to the cache memory (not shown), and issues trap request 31 as required.

[0124] The memory management unit 900 comprises a register 910, a decoder 920, and sub-priority controller 930. In the register 910, status data STM₁ expressing the status (state) of n! (factorial of n) of the memory management unit 900 is stored. The decoder 920 decodes the status data STM₁, and issues it as selection data SP₂.

[0125] This selection data SP₂ shown in FIG. 11 is the data for selecting any one of outputs of n! (factorial of n) pieces of priority encoders 931 ₀ to 931 _(n!) corresponding to the status (state) of the register 910 (see FIG. 10), in other words, n types of trap requests 940 ₀ to 940 _(n) by the multiplexer 932. Each one of the priority encoders 931 ₀ to 931 _(n!) encodes the trap request of high priority when plural trap requests are given at the same time, according to n! types of priority ranks in the trap requests 940 ₀ to 940 _(n).

[0126] The operation of the eighth embodiment will now be explained. In FIG. 10, the memory management unit 900, in the case of a certain status (called first status), stores status data STM₁ corresponding to this first status in the register 910. This status data STM₁ is decoded by the decoder 920, and is issued to the multiplexer 932 as selection data SP₂. As a result, the priority encoder 931 ₀ side shown in FIG. 11 is selected in the multiplexer 932.

[0127] In this state, when the trap request 940 ₀ and trap request 940 ₁ are given at the same time, for example, the priority encoder 931 ₀ encodes the trap request 940 ₀ by priority. In this case, since the priority encoder 931 ₀ side is selected by the multiplexer 932, the trap request 940 ₀ is issued from the multiplexer 932 to the priority controller 70 shown in FIG. 10 as the trap request 31. Thereafter, by the same operation as mentioned above, the trap request 31 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0128] In FIG. 10, when the status of the memory management unit 900 is changed from the first status to the second status, the memory management unit 900 stores the status data STM₁ corresponding to the second status in the register 910. This status data STM₁ is decoded by the decoder 920, and is issued to the multiplexer 932 as selection data SP₂. As a result, the priority encoder 931 ₁ side is selected in the multiplexer 932.

[0129] In this state, when the trap request 940 ₀ and trap request 940 ₁ are given at the same time, for example, the priority encoder 931 ₁ encodes the trap request 940 ₁ by priority. In this case, since the priority encoder 931 ₁ side is selected by the multiplexer 932, the trap request 940 ₁ is issued from the multiplexer 932 to the priority controller 70 shown in FIG. 10 as the trap request 31. Thereafter, by the same operation as mentioned above, the trap request 31 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0130] In the eighth embodiment, the execution unit is the memory management unit 900, but, alternatively, other execution unit than the memory management unit 900 (integer unit 10, floating point unit 20, program counter/branch unit 40, or CPU local bus I/F controller 50) may be provided with the same function as the memory management unit 900, and the trap request may be controlled by priority depending on the status of the execution unit.

[0131] In the seventh embodiment, the priority is controlled by the own execution unit (in this case, floating point unit 800), on trap requests as shown in FIG. 8, but it may be also designed to control priority within the own execution unit on the basis of the status of other execution unit than the own execution unit. Such example is explained as a ninth embodiment below.

[0132]FIG. 12 is a block diagram showing a configuration of the ninth embodiment of the invention. In the diagram, same components as in parts in FIG. 19 are identified with same reference numerals. Herein, instead of the program counter/branch unit 40 and memory management unit 30 shown in FIG. 19, a program counter/branch unit 1000 as own execution unit and a memory management unit 900 as other execution unit are provided.

[0133] The memory management unit 900 converts mutually between virtual address and physical address, controls accesses to the cache memory (not shown), and issues trap request 31 as required. The memory management unit 900 comprises a register 910. In the register 910, status data STM₁ expressing the status (state) of the memory management unit 900 is stored. The status includes a status corresponding to normal time of the memory management unit 900 (hereinafter called first status) and a status corresponding to other than normal time (hereinafter called second status).

[0134] The program counter/branch unit 1000 counts execution programs, and predicts branch address of program branch instruction, and issues a trap request 41 as required. The program counter/branch unit 1000 comprises a decoder 1010 and a sub-priority controller 1020. The decoder 1010 decodes the status data STM₁, and issues it as selection data SP₃.

[0135] This selection data SP₃ is the data for selecting either one of trap request 1030 ₀ and trap request 1030 ₁, depending on the status of the memory management unit 900, by the sub-priority controller 1020. This sub-priority controller 1020 is composed same as the sub-priority controller 830 (see FIG. 9).

[0136] Specifically, when the selection data SP₃ (status data STM₁) corresponds to the first status, the sub-priority controller 1020 selects the trap request 1030 ₀, and issues it to the priority controller 70 as trap request 41. On the other hand, when the selection data SP₃ (status data STM₁) corresponds to the second status, the sub-priority controller 1020 selects the trap request 1030 ₁, and issues it to the priority controller 70 as trap request 41.

[0137] The operation of the ninth embodiment will now be explained. In FIG. 12, the memory management unit 900, in the case that the status of the memory management unit 900 (other execution unit) is the first status, stores status data STM₁ corresponding to this first status in the register 910. This status data STM₁ is decoded by the decoder 1010 of the program counter/branch unit 1000 (own execution unit), and is put into the sub-priority controller 1020 as selection data SP₃.

[0138] In this state, when the trap request 1030 ₀ and trap request 1030 ₁ are given at the same time, the sub-priority controller 1020 selects the trap request 1030 ₀ by priority according to the selection data SP₃, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0139] Meanwhile, the memory management unit 900, in the case that the status of the memory management unit 900 (other execution unit) is changed from the first status to the second status, stores status data STM₁ corresponding to this second status in the register 910. This status data STM₁ is decoded by the decoder 1010 of the program counter/branch unit 1000 (own execution unit), and is put into the sub-priority controller 1020 as selection data SP₃.

[0140] In this state, when the trap request 1030 ₀ and trap request 1030 ₁ are given at the same time, the sub-priority controller 1020 selects the trap request 1030 ₁ by priority according to the selection data SP₃, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0141] In the ninth embodiment, the own execution unit is the program counter/branch unit 1000, and the other execution unit is the memory management unit 900, but the functions of the own execution unit and other execution unit may be given to the integer unit 10, floating point unit 20, and CPU local bus I/F controller 50, and the priority of trap requests may be controlled within the own execution unit depending on the status of the other execution unit.

[0142] As explained herein, according to the ninth embodiment, since the sub-priority controller 1020 is used for selecting according to the priority corresponding to the state of the memory management unit 900 (other execution unit), from the plural trap requests 1030 ₀ and 1030 ₁ in the program counter/branch unit 1000 (own execution unit), the priority control on trap requests can be executed finely at the program counter/branch unit 1000 (own execution unit) side.

[0143] In the ninth embodiment, as shown in FIG. 12, the priority of two trap requests 840 ₀ and 840 ₁ is controlled in the own execution unit (in this case, program counter/branch unit 1000), on the basis of the status of other execution unit (in this case, memory management unit 900), but it may be also designed to control priority of n types (three or more) of trap requests within the own execution unit on the basis of the status of other execution unit. Such example is explained as a tenth embodiment below.

[0144]FIG. 13 is a block diagram showing a configuration of the tenth embodiment of the invention. In the diagram, same components as in parts in FIG. 12 are identified with same reference numerals. Herein, instead of the program counter/branch unit 1000 shown in FIG. 12, a program counter/branch unit 1100 as own execution unit is provided.

[0145] In the tenth embodiment, in the register 910 of the memory management unit 900, the status data STM₁ expressing plural types (at least three) of the status (state) of the memory management unit 900 is stored. The status includes a first status, a second status, and so forth. The program counter/branch unit 1100 counts execution programs, and predicts branch address of program branch instruction, and issues a trap request 41 as required. The program counter/branch unit 1100 comprises a decoder 1110 and a sub-priority controller 1120. The decoder 1110 decodes the status data STM₁, and issues it as selection data SP₄.

[0146] This selection data SP₄ is the data for selecting either one of n types of trap requests 1130 ₀, 1130 ₁, . . . , 1130 _(n), depending on the status of the memory management unit 900, by the sub-priority controller 1120. This sub-priority controller 1120 is composed same as the sub-priority controller 930 (see FIG. 10). For example, when the selection data SP₄ (status data STM₁) corresponds to the first status, the sub-priority controller 1120 selects the trap request 1130 ₀, and issues it to the priority controller 70 as trap request 41.

[0147] The operation of the tenth embodiment will now be explained. In FIG. 13, the memory management unit 900, in the case that the status of the memory management unit 900 (other execution unit) is the first status, stores status data STM₁ corresponding to this first status in the register 910. This status data STM₁ is decoded by the decoder 1110 of the program counter/branch unit 1100 (own execution unit) and is put into the sub-priority controller 1120 as selection data SP₄.

[0148] In this state, when the trap request 1130 ₀ and trap request 1130 _(n) are given at the same time, the sub-priority controller 1120 selects the trap request 1130 ₀ by priority according to the selection data SP₄, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0149] Meanwhile, the memory management unit 900, in the case that the status of the memory management unit 900 (other execution unit) is changed from the first status to the second status, stores status data STM₁ corresponding to this second status in the register 910. This status data STM₁ is decoded by the decoder 1110 of the program counter/branch unit 1100 (own execution unit) and is put into the sub-priority controller 1120 as selection data SP₄.

[0150] In this state, when the trap request 1130 ₀ and trap request 1130 ₁ are given at the same time, the sub-priority controller 1120 selects the trap request 1130 ₁ by priority according to the selection data SP₄, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0151] In the tenth embodiment, the own execution unit is the program counter/branch unit 1100, and the other execution unit is the memory management unit 900, but the functions of the own execution unit and other execution unit may be given to the integer unit 10, floating point unit 20, and CPU local bus I/F controller 50, and the priority of trap requests may be controlled within the own execution unit depending on the status of the other execution unit.

[0152] In the seventh embodiment, as shown in FIG. 8, the priority of trap requests is controlled on the basis of the own execution unit (in this case, floating point unit 800), but it may be also designed to control priority within the own execution unit on the basis of the status of other execution unit, in addition to the status of the own execution unit. Such example is explained as an eleventh embodiment below.

[0153]FIG. 14 is a block diagram showing a configuration of the eleventh embodiment of the invention. In the diagram, same components as in parts in FIG. 8 are identified with same reference numerals. Herein, instead of the floating point unit 800 and program counter/branch unit 40 shown in FIG. 8, a floating point unit 1300 as own execution unit and a program counter/branch unit 1200 as other execution unit are provided.

[0154] The program counter/branch unit 1200 counts execution programs, and predicts branch address of program branch instruction, and issues a trap request 41 as required. The program counter/branch unit 1200 comprises a register 1210 as shown in FIG. 15. In the register 1210, status data STP₁ expressing the status (state) of the program counter/branch unit 1200 is stored.

[0155] For example, when the program counter/branch unit 1200 is in a state for operating in compliance with IEEE754, ieee#mode1=1 is stored in the register 1210 as status data STP₁. On the other hand, when the program counter/branch unit 1200 is in a state for operating other than IEEE754 (e.g. when fp operation is implementation dependent), ieee#mode1=0 is stored in the register 1210 as status data STP₁.

[0156] The floating point unit 1300 is an operator for executing floating point operation according to a floating point operation command, and issues trap request 21 as required. This floating point unit 1300 comprises a register 810, a decoder 1310, and sub-priority controller 1320. In the register 810, status data STF₁ expressing the status (state) of the floating point unit 1300 is stored. An example of this status is whether the floating point unit 1300 is in a state for operating in compliance with IEEE754 or not.

[0157] When the floating point unit 1300 is in a state for operating in compliance with IEEE754, ieee#mode2=1 is stored in the register 810 as status data STF₁. On the other hand, when the floating point unit 1300 is in a state for operating other than IEEE754 (e.g. when fp operation is implementation dependent), ieee#mode2=0 is stored in the register 810 as status data STF₁.

[0158] The decoder 1310 decodes the status data STF₁ from the register 810 of the floating point unit 1300 as the own execution unit or status data STP₁ from the register 1210 of the program counter/branch unit 1200 as the other execution unit, and issues it as selection data SP₅.

[0159] This selection data SP₅ is the data for selecting either one of trap request 840 ₀ (fp#exception#ieee#754) and trap request 840 ₁ (fp#exception#other) by the multiplexer 1322. Specifically, when the status data STP₁ is ieee#mode1=1 and the status data STF₁ is ieee#mode2=1, the multiplexer 1322 selects the trap request 840 ₀ which is the output of the priority encoder 1321 ₀, and sends it to the priority controller 70 as the trap request 21 (see FIG. 14).

[0160] On the other hand, when the status data STP₁ is ieee#mode1=0 and the status data STF₁ is ieee#mode2=0, the multiplexer 1322 selects the trap request 840 ₁ which is the output of the priority encoder 1321 ₁, and sends it to the priority controller 70 as the trap request 21 (see FIG. 14). Herein, the trap request 840 ₀ conforms to IEEE754, and the trap request 840 ₁ does not conform to IEEE754.

[0161] The priority encoder 1321 ₀, when the trap request 840 ₀ and trap request 840 ₁ are entered at the same time, encodes the trap request 840 ₀ by priority. On the other than, the priority encoder 1321 ₁, when the trap request 840 ₀ and trap request 840 ₁ are entered at the same time, encodes the trap request 840 ₁ by priority.

[0162] The operation of the eleventh embodiment will now be explained. In FIG. 15, in the case of operation in compliance with IEEE754, the program counter/branch unit 1200 stores ieee#mode1=1 in the register 1210 as status data STP₁. Similarly, in the case of operation conforming to IEEE754, the floating point unit 1300 stores ieee#mode2=1 in the register 810 as status data STF₁.

[0163] The status data STP₁ and status data STF₁ are decoded by the decoder 1310, and issued to the multiplexer 1322 as selection data SP₅. As a result, the priority encoder 1321 ₀ side is selected in the multiplexer 1322.

[0164] In this state, when the trap request 840 ₀ and trap request 840 ₁ are given at the same time, the priority encoder 1321 ₀ encodes the trap request 840 ₀ by priority. On the other hand, the priority encoder 1321 ₁ encodes the trap request 840 ₁ by priority.

[0165] In this case, since the priority encoder 1321 ₀ side is selected by the multiplexer 1322, the trap request 840 ₀ is issued from the multiplexer 1322 to the priority controller 70 shown in FIG. 14 as the trap request 21. Thereafter, by the same operation as mentioned above, the trap request 21 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0166] In FIG. 15, in the case of operation other than IEEE754 (e.g. when fp operation is implementation dependent), the program counter/branch unit 1200 stores ieee#mode1=0 in the register 1210 as status data STP₁. Similarly, in the case of operation other than IEEE754 (e.g. when fp operation is implementation dependent), the floating point unit 1300 stores ieee#mode2=0 in the register 810 as status data STF₁.

[0167] The status data STP₁ and status data STF₁ are decoded by the decoder 1310, and issued to the multiplexer 1322 as selection data SP₅. As a result, the priority encoder 1321 ₁ side is selected in the multiplexer 1322.

[0168] In this state, when the trap request 840 ₀ and trap request 840 ₁ are given at the same time, the priority encoder 1321 ₀ encodes the trap request 840 ₀ by priority. On the other hand, the priority encoder 1321 ₁ encodes the trap request 840 ₁ by priority.

[0169] In this case, since the priority encoder 1321 ₁ side is selected by the multiplexer 1322, the trap request 840 ₁ is issued from the multiplexer 1322 to the priority controller 70 shown in FIG. 14 as the trap request 21. Thereafter, by the same operation as mentioned above, the trap request 21 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0170] In the eleventh embodiment, as shown in FIG. 14, the own execution unit is the floating point unit 1300, and the other execution unit is the program counter/branch unit 1200, but the functions of the own execution unit and other execution unit may be provided in the integer unit 10, memory management unit 30, CPU local bus I/F controller 50 and others, and it may be designed to control the priority of trap requests in the own execution unit depending on the status of the own execution unit and the status of other execution unit.

[0171] As explained herein, according to the eleventh embodiment, since the sub-priority controller 1320 is used for selecting according to the priority corresponding to the state of the program counter/branch unit 1200 (other execution unit), and the state of the floating point unit 1300 (own execution unit), from the plural trap requests 840 ₀ and 840 ₁ in the floating point unit 1300 (own execution unit), the priority control on trap requests can be executed finely at the floating point unit 1300 (own execution unit) side.

[0172] In the eleventh embodiment, the priority of two trap requests 840 ₀ and 840 ₁ is controlled by the floating point unit 1300 (own execution unit) shown in FIG. 14, but it may be also designed to control priority of n types (three or more) of trap requests. Such example is explained as a twelfth embodiment below.

[0173]FIG. 16 is a block diagram showing a configuration of the twelfth embodiment of the invention. In the diagram, same components as in parts in FIG. 19 are identified with same reference numerals. Herein, instead of the program counter/branch unit 40 shown in FIG. 19, a program counter/branch unit 1400 as other execution unit is provided. Further, herein, instead of the memory management unit 30 shown in FIG. 19, a memory management unit 400 as other execution unit is provided.

[0174] This memory management unit 400, same as the memory management unit 30 (see FIG. 19), mutually converts between the virtual address and physical address, and controls access to the cache memory (not shown), and issues a trap request 31 as required. In the register 410 of this memory management unit 400, status data STM₁ expressing plural (three or more) types of status (state) of the memory management unit 400 is stored. There are plural types of status.

[0175] The program counter/branch unit 1400 counts execution programs, and predicts branch address of program branch instruction, and issues a trap request 41 as required. The program counter/branch unit 1400 comprises a register 1410, a decoder 1420, and a sub-priority controller 1430. In the register 1410, status data STP₂ expressing plural (three or more) types of status (state) of the program counter/branch unit 1400 is stored. There are plural types of status.

[0176] The decoder 1420 decodes the status data STM₁ and status data STP₂, and issues them as selection data SP₆. This selection data SP₆ is the data for selecting one of n types of trap requests 1440 ₀, 1440 ₁, . . . , 1440 _(n) in the sub-priority controller 1430, depending on the combination of the status of the memory management unit 400 and status of program counter/branch unit 1400 (for example, first combination, second combination, etc.).

[0177] The sub-priority controller 1430 is composed same as the sub-priority controller 930 mentioned above (see FIG. 10) For example, when the selection data SP₆ (status data STM₁) corresponds to the first combination, the sub-priority controller 1430 selects the trap request 1440 ₀, and sends it to the priority controller 70 as trap request 41.

[0178] The operation of the twelfth embodiment will now be explained. In FIG. 16, the memory management unit 400 (other execution unit) stores status data STM₁ corresponding to the present status in the register 410. Similarly, the program counter/branch unit 1400 (own execution unit) stores the status data STP₂ corresponding to the present status in the register 1410. The status data STM₁ and status data STP₂ are decoded by the decoder 1420 of the program counter/branch unit 1400 (own execution unit), and put into the sub-priority controller 1430 as selection data SP₆.

[0179] In this state, when the trap request 1440 ₀ and trap request 1440 ₁ are given at the same time, the sub-priority controller 1430 selects the trap request 1440 ₀ by priority according to the selection data SP₆, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0180] Meanwhile, the memory management unit 400, in the case that the status of the memory management unit 400 (other execution unit) is changed to other status, stores status data STM₁ corresponding to this other status in the register 410. Similarly, the program counter/branch unit 1400, in the case that the status of the program counter/branch unit 1400 (own execution unit) is changed to other status, stores the status data STP₂ corresponding to this other status in the register 1410.

[0181] The status data STM₁ and status data STP₂ are decoded by the decoder 1420 of the program counter/branch unit 1400 (own execution unit), and put into the sub-priority controller 1430 as selection data SP₆.

[0182] In this state, when the trap request 1440 ₀ and trap request 1440 ₁ are given at the same time, the sub-priority controller 1430 selects the trap request 1440 ₁ by priority according to the selection data SP₆, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0183] In the twelfth embodiment, the own execution unit is the program counter/branch unit 1400, and the other execution unit is the memory management unit 400, but the functions of the own execution unit and other execution unit may be given to the integer unit 10, floating point unit 20, and CPU local bus I/F controller 50, and the priority of trap requests may be controlled within the own execution unit depending on the status of the other execution unit and the status of the own execution unit.

[0184] In the eleventh embodiment, as the status of the other execution unit shown in FIG. 14, the status of one program counter/branch unit 1200 is used, but the status of plural other execution units may be also sued. Such example is explained as a thirteenth embodiment below.

[0185]FIG. 17 is a block diagram showing a configuration of the thirteenth embodiment of the invention. In the diagram, same components as inparts in FIG. 19 are identified with same reference numerals. Herein, instead of the integer unit 10, floating point unit 20, memory management unit 30, program counter/branch unit 40, and CPU local bus I/F controller 50 shown in FIG. 19, an integer unit 1500, a floating point unit 1600, a memory management unit 1700, a program counter/branch unit 1800, and a CPU local bus I/F controller 1900 are provided.

[0186] In the thirteenth embodiment, the program counter/branch unit 1800 functions as own execution unit, and all others, that is, the integer unit 1500, floating point unit 1600, memory management unit 1700, and CPU local bus I/F controller 1900, function as other execution units.

[0187] The basic functions of the integer unit 1500, floating point unit 1600, memory management unit 1700, program counter/branch unit 1800, and CPU local bus I/F controller 1900 are same as those of the integer unit 10, floating point unit 20, memory management unit 30, program counter/branch unit 40, and CPU local bus I/F controller 50.

[0188] Therefore, from the integer unit 1500, floating point unit 1600, memory management unit 1700, program counter/branch unit 1800, and CPU local bus I/F controller 1900, as required, trap request 11, trap request 21, trap request 31, trap request 41, and trap request 51 are issued.

[0189] However, the integer unit 1500 has a register 1510. In this register 1510, status data STI expressing the status (state) of the integer unit 1500 is stored. The floating point unit 1600 has a register 1610. In this register 1610, status data STF expressing the status (state) of the floating point unit 1600 is stored. The memory management unit 1700 has a register 1710. In this register 1710, status data STM expressing the status (state) of the memory management unit 1700 is stored.

[0190] The CPU local bus I/F controller 1900 has a register 1910. In this register 1910, status data STC expressing the status (state) of the CPU local bus I/F controller 1900 is stored. The program counter/branch unit 1800 has a register 1810, a decoder 1820, and a sub-priority controller 1830. In this register 1810, status data STP expressing the status (state) of the program counter/branch unit 1800 is stored.

[0191] The decoder 1820 decodes the status data STI, status data STF, status data STM, status data STC, and status data STP, and issues them as selection data SP₇. This selection data SP₇ is the data for selecting one of trap requests 1840 ₀ and 1840 ₁ in the sub-priority controller 1830, depending on the combination of the status data STI, . . . , and status data STP mentioned above (for example, first combination, second combination, etc.).

[0192] The sub-priority controller 1830 is composed same as the sub-priority controller 830 mentioned above (see FIG. 9). For example, when the selection data SP₇ corresponds to the first combination, the sub-priority controller 1830 selects the trap request 1840 ₀, and sends it to the priority controller 70 as trap request 41. On the other hand, when the selection data SP₇ corresponds to the second combination, the sub-priority controller 1830 selects the trap request 1840 ₁, and sends it to the priority controller 70 as trap request 41.

[0193] The operation of the thirteenth embodiment will now be explained. In FIG. 17, the other execution units, that is, the integer unit 1500, floating point unit 1600, memory management unit 1700, and CPU local bus I/F controller 1900 store status data STI, status data STF, status data STM, and status data STC corresponding to the present status respectively into the register 1510, register 1610, register 1710, and register 1910. Similarly, the program counter/branch unit 1800 (own execution unit) stores the status data STP corresponding to the present status in the register 1810.

[0194] The status data STI, status data STF, status data STM, status data STC, and status data STP are decodedbythe decoder 1820 of the program counter/branch unit 1800 (own execution unit), and put into the sub-priority controller 1830 as selection data SP₇. In this case, the combination of the status data is supposed to be the first combination.

[0195] In this state, when the trap request 1840 ₀ and trap request 1840 ₁ are given at the same time, the sub-priority controller 1830 selects the trap request 1840 ₀ by priority according to the selection data SP₇, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0196] Meanwhile, when the status of the integer unit 1500, floating point unit 1600, memory management unit 1700, program counter/branch unit 1800, and CPU local bus I/F controller 1900 is changed to other status, the other status is stored in each register.

[0197] The other status data STI, . . . , STC, STP are decoded by the decoder 1820 of the program counter/branch unit 1800 (own execution unit), and put into the sub-priority controller 1830 as selection data SP₇. In this case, the combination of the status data is supposed to be the second combination.

[0198] In this state, when the trap request 18400 and trap request 1840 ₁ are given at the same time, the sub-priority controller 1830 selects the trap request 1840 ₁ by priority according to the selection data SP₇, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0199] In the thirteenth embodiment, the own execution unit is the program counter/branch unit 1800, but the function of the program counter/branch unit 1800 may be also provided in the integer unit 1500, floating point unit 1600, memory management unit 1700, or CPU local bus I/F controller 1900.

[0200] In the thirteenth embodiment, the priority of two trap requests 1840 ₀ and 1840 ₁ is controlled by the program counter/branch unit 1800 (own execution unit) shown in FIG. 17, but it may be also designed to control priority of n types (three or more) of trap requests. Such example is explained as a fourteenth embodiment below.

[0201]FIG. 18 is a block diagram showing a configuration of the fourteenth embodiment of the invention. In the diagram, same components as inparts in FIG. 17 are identified with same reference numerals. Herein, instead of the program counter/branch unit 1800 shown in FIG. 17, a program counter/branch unit 2000 as own execution unit is provided.

[0202] The program counter/branch unit 2000 counts execution programs, and predicts branch address of program branch instruction, and issues a trap request 41 as required. The program counter/branch unit 2000 comprises a register 1810 (see FIG. 17), a decoder 2010, and a sub-priority controller 2020.

[0203] The decoder 2010 decodes the status data STI, status data STF, status data STM, status data STC, and status data STP, and issues them as selection data SP₈. This selection data SP₈ is the data for selecting one of n types of trap requests 1840 ₀, 1840 ₁, . . . , 1840 _(n) in the sub-priority controller 2020, depending on the combination of the status data STI, . . . , and status data STP (for example, first combination, second combination, etc.).

[0204] The sub-priority controller 2020 is composed same as the sub-priority controller 930 mentioned above (see FIG. 10). For example, when the selection data SP₈ corresponds to the first combination, the sub-priority controller 2020 selects the trap request 1840 ₀, and sends it to the priority controller 70 as trap request 41.

[0205] The operation of the fourteenth embodiment will now be explained. In FIG. 18, the other execution units, that is, the integer unit 1500, floating point unit 1600, memory management unit 1700, and CPU local bus I/F controller 1900 store status data STI, status data STF, status data STM, and status data STC corresponding to the present status respectively into the register 1510, register 1610, register 1710, and register 1910 same as in the case of the thirteenth embodiment. Similarly, the program counter/branch unit 2000 (own execution unit) stores the status data STP corresponding to the present status in the register 1810.

[0206] The status data STI, status data STF, status data STM, status data STC, and status data STP are decoded by the decoder 2010 of the program counter/branch unit 2000 (own execution unit), and put into the sub-priority controller 2020 as selection data SP₈. In this case, the combination of the status data is supposed to be the first combination.

[0207] In this state, when the trap request 1840 ₀ and trap request 1840 ₁ are given at the same time, the sub-priority controller 2020 selects the trap request 1840 ₀ by priority according to the selection data SP₈, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0208] Meanwhile, when the status of the integer unit 1500, floating point unit 1600, memory management unit 1700, program counter/branch unit 2000, and CPU local bus I/F controller 1900 is changed to other status, the other status is stored in each register same as in the case of the thirteenth embodiment.

[0209] The other status data STI, . . . , STC, and STP are decoded by the decoder 2010 of the program counter/branch unit 2000 (own execution unit), and put into the sub-priority controller 2020 as selection data SP₈. In this case, the combination of the status data is supposed to be the second combination.

[0210] In this state, when the trap request 1840 ₀ and trap request 1840 ₁ are given at the same time, the sub-priority controller 2020 selects the trap request 1840 ₁ by priority according to the selection data SP₈, and sends it to the priority controller 70 as trap request 41. Thereafter, by the same operation as mentioned above, the trap request 41 is fed into the trap type encoder 80 as trap request 71, and the trap type code 91 conforming to the trap map 90 is issued from the trap type encoder 80 to the read/write controller 100.

[0211] In the fourteenth embodiment, the own execution unit is the program counter/branch unit 2000, but the function of the program counter/branch unit 2000 may be also provided in the integer unit 1500, floating point unit 1600, memory management unit 1700, or CPU local bus I/F controller 1900.

[0212] The first to fourteenth embodiments of the invention are described above in detail by referring to the accompanying drawings, but specific examples are not limited to the first to fourteenth embodiments alone, but changes and modifications of design not departing from the true spirit of the invention are all included in the scope of the invention.

[0213] As described herein, according to the present invention, the encoding unit has the first trap map and second trap map corresponding to the first system and second system respectively, and the trap map can be changed depending on the system, so that the operation processing apparatus can be applied easily and inexpensively in plural systems.

[0214] Further, the encoding unit has the first trap map and second trap map conforming to the first state and second state of the execution unit, and the trap map can be changed depending on the state of the execution unit, and therefore a fine trap request control is possible depending on the state of the execution unit.

[0215] Further, since the priority control unit selects on the basis of the priority corresponding to the state of the execution unit among plural trap requests in the execution unit, the priority control can be finely executed corresponding to the trap request at the execution unit side.

[0216] Further, since the priority control unit selects on the basis of the priority corresponding to the state of the first execution unit among plural trap requests in the second execution unit, the priority control can be finely executed corresponding to the trap request at the second execution unit side.

[0217] Further, since the priority control unit selects on the basis of the priority corresponding to the state of the first execution unit and the state of the second execution unit among plural trap requests in the second execution unit, the priority control can be finely executed corresponding to the trap request at the second execution unit side.

[0218] Although the invention has been described with respect to a specific embodiment for a complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth. 

What is claimed is:
 1. An operation processing apparatus which executes trap processing on the basis of trap type code corresponding to a trap request from an execution unit, said operation processing apparatus comprising: a selecting unit which selects one system, out of at least a first system and a second system, for applying said operation processing apparatus from; and an encoding unit which encodes the trap request from said execution unit into first trap type code or second trap type code, based on the system selected by said selecting unit, from a first trap map defining the corresponding relation of the trap request and first trap type code conforming to the first system, and a second trap map defining the corresponding relation of the trap request and second trap type code conforming to the second system.
 2. The operation processing apparatus according to claim 1 , wherein said selecting unit selects one system, out of three or more systems, in which said operation processing apparatus is to be applied, and said encoding unit encodes the trap request from said execution unit, according to the system selected by said selecting unit, from three or more types of trap type code corresponding to said three or more systems.
 3. The operation processing apparatus according to claim 1 , wherein said selecting unit includes a storing unit which stores the selection data, and a decoding unit which decodes the selection data stored in said storing unit.
 4. The operation processing apparatus according to claim 1 , wherein said selecting unit includes a storing unit which stores the selection data determined by an external mechanism, and a decoding unit which decodes the selection data stored in said storing unit.
 5. An operation processing apparatus which executes trap processing on the basis of trap type code corresponding to a trap request from an execution unit, said operation processing apparatus comprising: an encoding unit which encodes the trap request from said execution unit into first trap type code or second trap type code, according to either one corresponding to the state of said execution unit, from a first trap map defining the corresponding relation of the trap request and first trap type code conforming to a first state of said execution unit, and a second trap map defining the corresponding relation of the trap request and second trap type code conforming to a second state of said execution unit.
 6. An operation processing apparatus which executes trap processing on the basis of trap type code corresponding to a trap request from an execution unit, having a plurality of trap maps defining the corresponding relation of the trap request and trap type code corresponding to the state of said execution unit, which comprises an encoding unit for encoding the trap request from the execution unit into trap type code, according to one of the plurality of trap maps corresponding to the state of said execution unit.
 7. An operation processing apparatus comprising: a status data storing unit which stores status data expressing the state of an execution unit; and a priority control unit which selects a trap request, on the basis of the priority determined by the status data, in the case a plurality of trap requests are issued simultaneously in said execution unit.
 8. The operation processing apparatus according to claim 7 , wherein said priority control unit selects the trap request of the highest priority, among three or more trap requests, on the basis of the priority determined by the status data, when three or more trap requests are given at the same time.
 9. An operation processing apparatus comprising: a status data storing unit which stores status data expressing the state of a first execution unit; and a priority control unit which selects a trap request, on the basis of the priority determined by the status data, in the case a plurality of trap requests are issued simultaneously in a second execution unit.
 10. The operation processing apparatus according to claim 9 , wherein said priority control unit selects the trap request of the highest priority, among three or more trap requests, on the basis of the priority determined by the status data, when three or more trap requests are given in said second execution unit at the same time.
 11. An operation processing apparatus comprising: a first status data storing unit which stores a first status data expressing the state of a first execution unit; a second status data storing unit which stores a second status data relating to the state of a second execution unit; and a priority control unit which selects a trap request, on the basis of the priority determined by the first status data and second status data, in the case a plurality of trap requests are issued simultaneously in said second execution unit.
 12. The operation processing apparatus according to claim 11 , wherein said priority control unit selects the trap request of the highest priority, among three or more trap requests, on the basis of the priority determined by the first status data and second status data, when three or more trap requests are given in said second execution unit at the same time.
 13. An operation processing apparatus comprising: a first status data storing unit which stores a first status data expressing the state of a first execution unit; a plurality of second status data storing unit which stores a second status data relating to the state of each one of a plurality of second execution units other than said first execution unit; and a priority control unit which selects a trap request, on the basis of the priority determined by the first status data and plurality of second status data, in the case a plurality of trap requests are issued simultaneously in said second execution units.
 14. The operation processing apparatus according to claim 13 , wherein said priority control unit selects the trap request of the highest priority, among three or more trap requests, on the basis of the priority determined by the first status data and plurality of second status data, when three or more trap requests are given in said second execution unit at the same time. 